home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / demo / medowl.zip / SOURCE / MEDTVIEW.H < prev   
C/C++ Source or Header  |  1994-08-18  |  2KB  |  69 lines

  1. #ifndef MAGMA
  2. #define MAGMA
  3. #endif
  4. //----------------------------------------------------------------------------
  5. // ObjectWindows - (C) Copyright 1993 by Borland International
  6. //   include\owl\editview.h
  7. //   Defines classes TEditView
  8. //----------------------------------------------------------------------------
  9. #if !defined(__OWL_MAGMAEDITVIEW_H)
  10. #define __OWL_MAGMAEDITVIEW_H
  11.  
  12. #if !defined(__OWL_DOCMANAG_H)
  13.   #include <owl\docmanag.h>
  14. #endif
  15. #if !defined(__OWL_MAGMAEDITSEAR_H)
  16. #if defined(MAGMA)
  17.   #include <owl\medtsear.h>
  18. #else
  19.   #include <owl\editsear.h>
  20. #endif
  21. #endif
  22.  
  23. //
  24. //  class TMagmaEditView
  25. //  ----- ---------
  26. //
  27. class _OWLCLASS TMagmaEditView : public TMagmaEditSearch, public TView {
  28.   public:
  29.     TMagmaEditView(TDocument& doc, TWindow* parent = 0);
  30.    ~TMagmaEditView();
  31. #if defined(MAGMA)
  32.     static const char far* StaticName() {return "Magma Edit View";}  // put in resource
  33. #else
  34.     static const char far* StaticName() {return "Edit View";}  // put in resource
  35. #endif
  36.     //
  37.     // overridden virtuals from TView
  38.     //
  39.     const char far*   GetViewName(){return StaticName();}
  40.     TWindow* GetWindow()  {return (TWindow*)this;}
  41.     BOOL     SetDocTitle(const char far* docname, int index)
  42.                           {return TMagmaEditSearch::SetDocTitle(docname, index); }
  43.     //
  44.     // overridden virtuals from TWindow
  45.     //
  46.     BOOL   Create();
  47.     void   PerformCreate(int menuOrId);
  48.     BOOL   CanClose()   {return TMagmaEditSearch::CanClose() && Doc->CanClose();}
  49.  
  50.   protected:
  51.     long   Origin;
  52.     BOOL   LoadData();
  53.     //
  54.     // message response functions
  55.     //
  56.     void   EvNCDestroy();
  57.     BOOL   VnCommit(BOOL force);
  58.     BOOL   VnRevert(BOOL clear);
  59.     BOOL   VnIsWindow(HWND hWnd) {return HWindow == hWnd;}
  60.     BOOL   VnIsDirty()  {return TMagmaEditSearch::IsModified();}
  61.     BOOL   VnDocClosed(int omode);
  62.         
  63.   DECLARE_RESPONSE_TABLE(TMagmaEditView);
  64.   DECLARE_STREAMABLE(_OWLCLASS, TMagmaEditView,1);
  65. };
  66.  
  67. #endif  // __OWL_MAGMAEDITVIEW_H
  68.  
  69.